package com.qf01;

public class MyThread extends Thread{

    public MyThread() {
    }

    public MyThread(String name) {
        super(name);
    }

    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
//            System.out.println("子线程......"+i);
//            System.out.println("线程id："+this.getId()+",线程名称:"+this.getName()+",次数:"+i);
            System.out.println("线程id："+Thread.currentThread().getId()+",线程名称:"+Thread.currentThread().getName()+",次数:"+i);
        }
    }
}
